Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add lots of comments on the function of BuildTracker #12194

Merged
merged 4 commits into from
Aug 11, 2023

Conversation

cosmicexplorer
Copy link
Contributor

Split out from #12186. It's not currently clear what the function of the BuildTracker is or when it needs to be used (imho). I thought that it was for managing parallel builds somehow, but it turns out it is just a validation mechanism specifically for sdists.

This change is subjective and it does not need to be merged. I think that these comments + changes make the purpose of the BuildTracker more clear, so that future pip contributors will more easily understand when to use it.

This change also modifies AbstractDistribution with .build_tracker_id to explicitly specify when .prepare_distribution_metadata() is going to be called, which makes the change in #12186 to cache the generated dist much easier to understand (imho).

@cosmicexplorer
Copy link
Contributor Author

cc @sbidoul @uranusjr @pradyunsg no rush at all; please feel free to reject this change.

Copy link
Member

@uranusjr uranusjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me

Copy link
Member

@pfmoore pfmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of improvements to one of the comments is all. But I'm in favour of this as I didn't even realise that the build tracker was what handled our fork bomb protection.

src/pip/_internal/operations/build/build_tracker.py Outdated Show resolved Hide resolved
src/pip/_internal/operations/build/build_tracker.py Outdated Show resolved Hide resolved
@pfmoore pfmoore merged commit 5378a6e into pypa:main Aug 11, 2023
24 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants